'use strict';

module.exports = appInfo => {
    const config = {};

    config.eureka = {
        eurekaUrl: 'http://10.1.10.21:48010/eureka/apps'//测试环境地址
        // eurekaUrl: 'http://10.1.10.22:38010/eureka/apps'//开发环境地址
    };


    config.qiyu = {
        webUrl: 'http://liumo.qiyukf.com',
    };

    config.insurance = {
        sellPackageId: 23,
        // path: '/work_data/groupInsurance'
    }

    config.ads = {
        isShow: true,
    }
    config.warehouses = {
        warehouseId: 1,
    }

    config.crm = {
        webUrl: 'http://d.crm.wanhuhealth.com',
    }

    config.pbm = {
        baseUrl: process.env.PBM_API_URL,
        // baseUrl:'https://app.wanhuhealth.com/services/rest/',
    }

    config.baiji = {
        url: "https://wh.baiji.com.cn/api/user.php"
    };

    config.baiduTongjiCode = 'ba0f927c2ab465ba0ff23a13854fc064';

    config.weixin = {
        debug: true,
        // appId: 'wx46d557ed53c0e234',
        // appSecret: '917a0a9fc76a1c43600ffc6b817354ad',
        // webUrl: 'https://demo-pay.wanhuhealth.com/',
        // token: 'ER4xeGImt5ZfNTTZZXVa4RMrpDuD53g2',
        // appId: 'wxf640255a6910b036',
        // appSecret: '06e12520d991da6f36606a920959d087',
        // webUrl: 'http://local.eldereal.me:7001/',
        // token: 'ER4xeGImt5ZfNTTZZXVa4RMrpDuD53g2',
        appId: 'wx63c280128fc571d4',
        appSecret: '2ca8335ad233728bea946aaf69625367',
        webUrl: 'http://local.eldereal.me:7001/',
        token: 'ER4xeGImt5ZfNTTZZXVa4RMrpDuD53g2',
        miniAppId: 'wxd9de566fb44faee8',
        encodingAESKey: '',
        verifyFile: 'JwCMZPAxYmBgOhAN',
    };

    config.baiduMap = {
        appKey: 'huV3kaj0k4tWYi4AS5fVftj3qEKB1lHx'
    };

    config.logger = {
        dir: 'logs'
    };

    config.security = {
        domainWhiteList: ['liumo.qiyukf.com', '127.0.0.1:7001', 'open.weixin.qq.com','v1.cnzz.com'],
        csrf: {
            ignore: ctx => ctx.originalUrl.startsWith('/wx') ||
                ctx.originalUrl.startsWith('/qiyu/') ||
                ctx.originalUrl.startsWith('/sockjs-node/') ||
                ctx.originalUrl.startsWith('/__webpack_dev_server__/')
        }
    };

    config.cors = {
        origin: ['http://liumo.qiyukf.com','at.alicdn.com','https://cdn.bootcdn.net'],
    };

    config.appView = {
        devServer: 'http://localhost:3000/'
    };

    return config;
};
